import { defineStore } from "pinia";

export const useAside =defineStore('main',{
    state:()=>({
        isCollapse:true,
        currentMenu:null
    }),
    actions:{
        updateIsCollapse(){
            this.isCollapse = !this.isCollapse
        },
        selectMenu(val){
            // console.log(val);
            if(val.name=='home'){
                this.currentMenu=null
            }else{
                this.currentMenu=val
            }
        }
    }
})